<template>
  <div>
    <div class="main-table">
      <el-tabs v-model="noFrame" @tab-click="handleClick">
        <el-tab-pane label="无匹配" name="first">
          <noFrame :prId="prId"></noFrame>
        </el-tab-pane>
        <el-tab-pane label="失效框架" name="second">
          <unEffectFrame :prId="prId"></unEffectFrame>
        </el-tab-pane>
        <el-tab-pane label="有效框架" name="third">
          <effectFrame :prId="prId"></effectFrame>
        </el-tab-pane>
      </el-tabs>   
    </div>
  </div>
</template>
<script>
  import NoFrame from './noFrame.vue'
  import UnEffectFrame from './unEffectFrame.vue'
  import EffectFrame from './effectFrame.vue'
  export default {
    components: {
      NoFrame,
      UnEffectFrame,
      EffectFrame
    },    
    data() {
      return {
        // 跳转传递过来的采购申请ID
        prId:this.$route.query.prId,
        noFrame: 'first'
      };
    },
    mounted(){
      //this.initMatch();
    },
    methods: {
      // 初始化匹配方法
      initMatch(){
        this.axios.post(this.lib.config.host.prModule + "/purchaserequest/match/purReqMatchTab/" + this.$route.query.prId);
      },
      handleClick(tab, event) {
        console.log(tab, event);
      }
    }
  };
</script>